<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 100px;
            height: 100px;
        }

        .dav {
            background-color: red;
            border: 1px solid pink;
        }
    </style>
</head>

<body>
    <div class="dav"></div>
    <p>111</p>
</body>
<script src="./jquery-3.7.1.min.js"></script>
<script>
    let csss = $(".dav").css('border');
    console.log(csss);
    // $("p").addClass("dav");
    $(".dav").removeClass('dav');
    $("div").removeClass('dav');
    $("p").click(function () {
        $('div').toggleClass("dav");
    })
    // addClass()添加class属性
</script>

</html>